// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import Vuex from 'vuex'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Icon from 'vue-svg-icon/Icon.vue'
import axios from 'axios'
import _g from './assets/js/global'
import store from './vuex/store'

axios.defaults.withCredentials = true
//axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
//设置全局的
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.component('icon', Icon); 
window.axios = axios

const bus = new Vue()
window.bus = bus
window._g = _g
window.store = store

axios.defaults.baseURL = 'http://api.fengzhan100.com'

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
